home *** CD-ROM | disk | FTP | other *** search
/ Aminet 14 / Aminet 14 - Oct 1996.iso / TCalc / Italiano / TurboCalc3.5Demo / Programmer / Examples.lha / tclib.i < prev    next >
Text File  |  1994-11-28  |  22KB  |  498 lines

  1.  
  2.     include 'tclib2.i'  ; some usefull macro-definitions, see there
  3.  
  4. TCLIB_ID = 'TCLB'
  5.  
  6. TCLIB_SUBID_FLRQ = 'FLRQ'       ; filerequester
  7. TCLIB_SUBID_CRYP = 'CRYP'       ; crypt-library
  8. TCLIB_SUBID_OBJT = 'OBJT'       ; object-library
  9. TCLIB_SUBID_FNCT = 'FNCT'       ; user-funtions
  10. TCLIB_SUBID_MCRO = 'MCRO'       ; user-macros
  11.  
  12.  
  13. * IMPORTANT: All routines may only change d0-d1/a0-a1, all other registers
  14. * have to be preserved!
  15.  
  16.  
  17.     STRUCTURE TCLib,0
  18.     LONG tclib_header   ; moveq #-13,d0     or $70F34E75
  19.                         ; rts
  20.                         ; if user tries to start this file!
  21.     LONG tclib_id       ; TCLIB_ID ('TCLB')
  22.     LONG tclib_subid    ; one of the TCLIB_SUBID's declared above
  23.     WORD tclib_version
  24.     WORD tclib_revision
  25.     LONG tclib_name     ; *text with short description of this lib
  26.     LONG tclib_ver      ; *ver_text
  27.     LONG tclib_author   ; *text with your name
  28.     LONG tclib_flags    ; reserved, set to 0.l for now
  29.     LONG lib_reserved1
  30.     LONG lib_reserved2
  31. *
  32.     LONG tclib_init     ;INIT: routine is called on startup, return one of:
  33.                         ;   0: if installed correctly
  34.                         ;   1: can't use: remove - try to load next time
  35.                         ;   -1: impossible to use: remove &  don't try
  36.                         ;       to load this lib again
  37.     LONG tclib_exit     ;END: routine is called before TurboCalc ends
  38.                         ;   free all allocated mem & other resources
  39.     LONG tclib_flush    ;FLUSH: routine is called when TurboCalc runs
  40.                         ; runs short of memory.
  41.                         ; lib is asked to free (temporarily) unused
  42.                         ;  memory (not used up to now, simply set to 0.l)
  43.  
  44.     LONG tclib_method   ; Global routine for all purposes, called with
  45.                         ; method (what shall be done?) and data.
  46.                         ; Isn't currently used. (Simply set to 0)
  47.     LABEL tclib_rout1   ; Here the type-specific routines start, they are
  48.                         ; defined in the type-specific description below.
  49.                         ;
  50.  
  51.     LABEL TCLib_SIZEOF
  52.  
  53.  
  54.  
  55.     STRUCTURE TCLib_filereq,TCLib_SIZEOF
  56.     LONG libfr_filereq  ; open window & ask for filename
  57.             ; error=filereq(filename, title_text, screen, pattern, flags)
  58.             ;               a0        a1          a2      a3       a4
  59.             ; para: a0: *filename (200 chars reserved, both for old and
  60.             ;           for new filename, if returning d0=0)
  61.             ;       a1: *title_text
  62.             ;       a2: *screen (or 0.l for workbench)
  63.             ;       a3: *pattern
  64.             ;       d0: flags (bit0: save, bit1:drawer_only)
  65.             ;           (drawer_only isn't needed up to now!)
  66.             ; return: d0: 0=ok (filename is changed)
  67.             ;             1=abort
  68.             ;            -1=serious error (e.g. no mem)
  69.             ;               (in this case a simple string-
  70.             ;               filerequester will appear)
  71.     LABEL libfr_SIZEOF
  72.  
  73.  
  74.  
  75.     STRUCTURE TCLib_objectclass,TCLib_SIZEOF
  76.     LONG liboc_nextclass
  77.             ; *next object-class (used by TC to keep list of all classes)
  78.             ; should be set to 0.l
  79.             ; (or to pointer on next object-class. This way you
  80.             ; can store multiple classes in one tclib! Last class
  81.             ; must have 0.l then!)
  82.     LONG liboc_classtext
  83.             ; *short_text (null-terminated), is object-description
  84.             ; This text will be shown in the <Data-Create Object>-Requester!
  85.     LONG liboc_classid
  86.             ; This field contains up to 4 chars with an id for this
  87.             ; objectclass (thus it should be unique). It is used to
  88.             ; select and define a specific objectclass (for loading/
  89.             ; saving or with the OBJECT-macro)
  90.             ; If the text has less then 4 chars, fill it with \0s
  91.             ; 'GEL\0', 'IFF\0', 'TEXT', 'CHRT' are used for the intern
  92.             ; object-classes, 'LOGO' for the extern one.
  93.             ; See MISSING.
  94.     BYTE liboc_flags0
  95. OBJCLASSFLAGS0_FRAME = 0    ; %00=off, %01=on, %10=3d, %11=3d-2
  96. OBJCLASSFLAGS0_FRAME_3d = 1
  97. OBJCLASSFLAGS0_BACKFILL = 2  ; enables backfill of object
  98. OBJCLASSFLAGS0_BACKWHITE = 3 ; backfill with white (instead of grey)
  99.     BYTE liboc_flags1
  100. OBJCLASSFLAGS1_EDITTASK = 0 ; call _objectedit from the task not the process
  101. OBJCLASSFLAGS1_ACTIONTASK = 1   ; dito for _objectaction (see tclib.doc)
  102.     BYTE liboc_flags2
  103.     BYTE liboc_flags3
  104.             ; object-flags, if not defined below: reserved & set to 0
  105.             ; liboc_flag0: default-values for new object:
  106.  
  107.     LONG liboc_objectnew
  108.             ; object, flags = objectnew(num1/num2/*text)
  109.             ; d0      d1                  d0   d1   a0
  110.             ; generate a new, empty object
  111.             ; para: d0/d1/a0: number/number/*text
  112.             ;       Normally all three regs are set to 0.l, which asks
  113.             ;       for a default object.
  114.             ;       These paras are set by the macro-command OBJECT to
  115.             ;       allow the creation of a specific object.
  116.             ;
  117.             ;       if called with paras, see macro OBJECT
  118.             ;       otherwise all three regs are 0, it would be a good
  119.             ;           idea to return 1 in d1 (to let the user
  120.             ;           configurate his object - if needed)
  121.             ; return: d0: *object (or 0.l if not possible)
  122.             ;         d1: auto_edit (0=no, 1=call OBJECT_EDIT
  123.             ;             after initialization - if called with default
  124.             ;             paras 0/0/0 the a good idea to return d1=1
  125.             ;             (and thus let the user configurate this object,
  126.             ;             if possible)
  127.             ; ATTENTION: d0 is used by TC to identify the object
  128.             ; (of all classes), so d0 should be unique for all classes.
  129.             ; Thus return a pointer to allocated mem (either with
  130.             ; exec's or TC's routine!)
  131.     LONG liboc_objectduplicate
  132.             ; object = duplicate(object)
  133.             ; d0                 a0
  134.             ; Duplicate the object a0 return the new *object in d0
  135.             ; (or 0.l, if duplication failed)
  136.     LONG liboc_objectedit
  137.             ; redisplay = edit(object)
  138.             ; d0               a0
  139.             ; 'edit' the object a0 - e.g. open a requesterto user-change
  140.             ;                        object-settings
  141.             ; para: a0=*object (a3=*sheet, a4=*tcobject, both private!!!)
  142.             ; return: d0<>0: redisplay as something was changed!
  143.     LONG liboc_objectdraw
  144.             ; draw object a0
  145.             ; para: a0:*object
  146.             ;       a2: rp
  147.             ;       a6: *GfxBase (simply to make life easier ;^)
  148.             ;       d0-d3: object_box (x1/y1/x2/y2)
  149.             ;       d4: scale (for screen 0.l,
  150.             ;                  for printer: lower_word = numerator
  151.             ;                                upper_word = denominator
  152.             ;           'scale' is intended for scaling fonts
  153.             ;           you might prefer to use object_box for that reason
  154.             ;           (e.g. for scaling pictures)
  155.             ;           can be used to scale fonts...
  156.             ;               newsize=oldsize*(d4&0xffff)/(d4>>16)
  157.             ;           or in asm (d0=oldsize)
  158.             ;               tst.l   d4
  159.             ;               beq.s   noscale
  160.             ;               mulu    d4,d0
  161.             ;               swap    d4
  162.             ;               divu    d4,d0
  163.             ;               swap    d4
  164.             ;            noscale:
  165.             ;
  166.             ; d5: flags (currently unused: 0.l)
  167.     LONG liboc_objectload
  168.             ; Create new object by loading it from sheet.
  169.             ; This is a bit tricky...
  170.             ; para: d0=0 (or d0=1 & a0=*mem, see iii)
  171.             ; (a2=*tcobject, a3=*sheet, a4=*load_handle)
  172.             ;
  173.             ; return:
  174.             ;   a0: *object
  175.             ;   d0: flags
  176.             ; this allows the following tree possibilities:
  177.             ;   i) a0=*object, d0=0 (or d0=1, see iii)
  178.             ;  ii) a0=0.l, d0=0.l: error occured, no object created
  179.             ;                      (e.g. no memory)
  180.             ; iii) a0=0.l, d0=size
  181.             ;       When you return this, TurboCalc reads d0 bytes and
  182.             ;       calls this routine `loboc_objectload' again.
  183.             ;       Create your object from this memory then and
  184.             ;       return it in a0 (case i)
  185.             ;       If you return with a0=object & d0=0, TurboCalc frees
  186.             ;       the allocated memory for you (as TC allocated it)
  187.             ;       If you insist on freeing this piece of memory by your
  188.             ;       routine (e.g. it is exactly your private object-
  189.             ;       structure), then return with d0=1.
  190.             ;       (Remark: This mem is allocated with TC's AllocMemClear!
  191.             ;       your OBJECT_FREE-routine thus must free this mem
  192.             ;       with TC's FreeMem.)
  193.  
  194.     LONG liboc_objectsave
  195.             ; When TurboCalc saves a sheet (with objects) this routine
  196.             ; is called for every object.
  197.             ; para: a0 = object
  198.             ;       d0 = flags, normally 0 (or 1, see iv)!
  199.             ; (a2=*tcobject, a3=*sheet, a4=*save_handle)
  200.             ; return: a0 = *block
  201.             ;         d0 = blocksize
  202.             ;         d1 = flags
  203.             ;
  204.             ; You have the following four possibilities:
  205.             ;
  206.             ;   i) a0=*mem, d0=size, d1=0.l - don't free mem
  207.             ;       Save size bytes starting at mem, but to not free
  208.             ;       mem (usefull, if you simply return in a0 a pointer
  209.             ;       to your private structure - probably to be used
  210.             ;       with loading-case iii), d0=1 )
  211.             ;  ii) a0=*mem, d0=size, d1=1.l
  212.             ;       Save size bytes starting at mem, and free Mem via
  213.             ;       TurboCalc's FreeMem-Routine - this piece of memory
  214.             ;       thus should be allocated via AllocMem(Clear)
  215.             ; iii) a0=*mem, d0=size, d1=2.l - free mem via exec's
  216.             ;       Save size bytes starting at mem, and free Mem via
  217.             ;       exec's FreeMem-Routine: _LVOFreeMem(mem,size)
  218.             ; iv) a0=0.l, d0=size - return size only
  219.             ;       You want to save the object yourself using
  220.             ;       Write_Byte/Word/Long/Size (see below)
  221.             ;       To do this, TurboCalc calls this routine again
  222.             ;       (with para d0=1) after saving the object-header.
  223.             ;       Important: TurboCalc *must* save the object-header
  224.             ;       first, therefore the size must be specified correctly
  225.             ;               1) set a0=0 & d0=size, return (do *not* write
  226.             ;                  in this mode)
  227.             ;               2) your routine is called again with d0=1
  228.             ;                  Now write the size bytes with Write_...
  229.             ;                  and return: a0=0.l, d0=0.l
  230.     LONG liboc_objectaction
  231.             ; This routine is called when clicking on the object
  232.             ; para: d0=mode (0=click on object, 1=double-click)
  233.             ;       d1=flags (for clicking: 0=clicked on object (macro)
  234.             ;                               1=clicked on object (move)
  235.             ;                               2=clicked on 'size'
  236.             ;                               bit7: if set: object_back (for 1/2)
  237.             ;                (for double-click: is 0.l up to now)
  238.             ;       a0=object
  239.             ;
  240.             ; return: d0=error (0=ok)
  241.             ;         for double-click: if you return with d0<>0
  242.             ;               the default action (opening the settings-
  243.             ;               requester) isn't done, double-click will
  244.             ;               simple be aborted. This is usefull if you
  245.             ;               want to replace the default double-click-action.
  246.             ;         Return value is only used when OBJCLASSFLAGS1_ACTIONTASK
  247.             ;         is selected. Otherwise it is ignored (as the routine
  248.             ;         is called unsynchronously).
  249.             ;
  250.             ; Inportant: It is possible that (in future) new modes will be
  251.             ; added. So please check for the current (implemented) modes
  252.             ; and return d0=0 for the others (and do *not* rely on d0
  253.             ; being 1 if d0<>0!!!).
  254.             ;
  255.             ; You might do whatever you want (e.g. playing a sample
  256.             ; for moving/sizing, starting an external program on double-click)
  257.             ; IF your object has no 'special action' simply omit this
  258.             ; routine (by setting this pointer to 0.l)
  259.             ;
  260.     LABEL liboc_SIZEOF
  261.  
  262.  
  263.  
  264.     STRUCTURE TCLib_crypt,TCLib_SIZEOF
  265.     LONG libcrypt_password  ; set password for en/decrypting
  266.             ; para: a0= *string, null-terminated
  267.             ;       either copy this string to your one buffer or
  268.             ;       (even better) use an algorithm to calculate
  269.             ;       real key (e.g. MD5 or CRC)
  270.     LONG libcrypt_encrypt   ; encrypt block
  271.             ; para: a0= *block
  272.             ;       d0= length of block (in bytes)
  273.     LONG libcrypt_decrypt   ; decrypt block
  274.             ; para: a0= *block
  275.             ;       d0= length of block (in bytes)
  276.     LABEL libcrypt_SIZEOF
  277.  
  278.  
  279.  
  280.     STRUCTURE TCLib_function,TCLib_SIZEOF
  281.     LONG libfnc_flags   ; reserved, unused, set to 0.l!
  282.     LONG libfnc_count   ; #routines below (routine0..routinecount-1)
  283.     LONG libfnc_defaultroutine
  284.             ; this routine is called if either d7 >=count or
  285.             ; libfnc_routine(d7) is 0.l
  286.     LONG libfnc_routine0
  287. ;    LONG libfnc_routine1
  288. ;    LONG libfnc_routine2
  289. ;    ...
  290. ;    LONG libfnc_routine(count-1)
  291.     LABEL libfnc_SIZEOF
  292.  
  293. * parameters for all the fnc_routines:
  294. *   d0-d1:  Value1 (as float)
  295. *   d2:     Value1 (as long)
  296. *   d3-d4:  Value2 (as float)
  297. *   d5:     Value2 (as long)
  298. *   d7:     routine-offset (0..) If libfnc_routinex is called, this
  299. *           is equal to x and thus not needed. If libfnc_defaulroutine
  300. *           is called you might need this data.
  301. *   a0:     String (or 0.l)
  302.  
  303. * Annotation: The two values are given both as float and as long.
  304. * So you needn't convert them. 'Float' is the first one available
  305. * in {mathieedoubbas/trans, mathieeesingbas/trans, mathffp/trans}
  306. * (thus normally in double-ieee-format!).
  307.  
  308. * return (for functions):
  309. * d0/d1.l:  data (type dependent)
  310. * d2.l      type - one of:
  311. TYPE_EMPTY = 0  ; no return value, shouldn't be used!
  312. TYPE_NO = 1     ; dito - please return NUM 0 instead (d0-d2 = 0/0/3)
  313. TYPE_FLOAT = 2  ; d0/d1.l is float as defined above
  314. TYPE_NUM = 3    ; d0.l is long
  315. TYPE_DATE = 4   ; d0.l is date (i.e. long)
  316. TYPE_TIME = 5   ; d0.l is date (i.e. long)
  317. TYPE_BOOL = 6   ; d0.l is bool (0=FALSE, 1=TRUE)
  318. TYPE_TEXT = 7   ; d0=*text (or 0, then is empty text!!!)
  319.                 ;
  320. TYPE_CELL = 8   ; d0.l=column/d1.l=row (you cannot return this in
  321.                 ; all situatuons)
  322. TYPE_ERROR = 9  ; d0.l=error (1..12)
  323.                 ;      with 1=don't know, 2=DIV/0, 3=VERSION
  324.                 ;      4=REFERENCE, 5=)-BRACKET, 6=TYPE, 7=NOCELL
  325.                 ;      8=ARG_NO_RANGE, 9=(-BRACKET, 10=SEMICOLON
  326.                 ;      11=VALUE, 12=EOLINE
  327.  
  328. * return (for macros):
  329. * d0.l:     error-code (0=ok, other see appendix of TurboCalc manual)
  330.  
  331. * Hint: As you cannot determine if a macro-command is called as functions
  332. * it is a good idea to return the error code together with d2=TYPE_NUM (3).
  333. * When called as macro, d2 is ignorded, otherwise it is interpreted
  334. * as normal value.
  335.  
  336.  
  337.  
  338.  
  339. *   default parameter for all routines: a5 = *BASE, structure see below
  340. *
  341.  
  342. *****************************************************************
  343. *****************************************************************
  344. * as mentioned above, a5 (BASE) points to 'global-data-structure'
  345. * containing both useful data and useful routines
  346.  
  347. * XVECT allocates 6 bytes
  348. * definition of XVECT, XSR, XMP ... see 'tclib2.i'
  349.  
  350.  
  351. TurboCalc_Version = -4      ; current revision.w/version.w
  352. TurboCalc_Revision = -2     ; of TurboCalc (starting with 3.01, sorry)
  353.  
  354.     STRUCTURE MainData,0
  355.     LONG DosBase            ; Important: Dos, Gfx & Intuitionbase will
  356.     LONG GfxBase            ; be set correctly (as TC needs them to work),
  357.     LONG IntuitionBase      ; but you can't rely on the other libbases.
  358.     LONG LayersBase         ; They may be zero, if these libs aren't
  359.     LONG DiskFontBase       ; currently available in the system (e.g.
  360.     LONG WBBase             ; workbench is closed or KS 1.3 for asl.library)
  361.     LONG ASLBase
  362.     LONG IFFParseBase
  363.     LONG RexxBase
  364.     LONG AmigaGuideBase
  365.     LONG LocaleBase
  366. *
  367.     LONG FirstWindow        ; private
  368.     LONG FirstSheet         ;  .  not even think of touching them!!!
  369.     LONG FirstFont          ;  .
  370.     LONG FontList           ;  .
  371.     LONG LocaleCatalog      ;  .
  372.     LONG AmigaGuideHandle   ;  .
  373.     LONG Screen             ; private
  374. *
  375.     LONG Com_DiskErrorAdr   ; error-routine-adr for Read_ & Write_
  376.                             ; see below!
  377.  
  378. * some useful routines
  379. * each vector consits of 6 bytes (first two: jmp, then the address)
  380. * call them as you normally call libraries (see macros XSR & XMP above)
  381. * if not mentioned otherwise, only d0-d1/a0-a1 are changed!
  382.  
  383. *
  384.     XVECT AllocMem          ; para: d0 = size, return d0=a0=*mem - flags set
  385.                             ; size is stored by TC & this piece of memory
  386.                             ; will be freed automatically by TC
  387.                             ; (when TC ends and it hasn't been freed yet)
  388.     XVECT AllocMemClear     ; dito, but memory is cleared
  389.     XVECT FreeMem           ; para: a0 = *mem, frees with AllocMem allocated
  390.                             ; memory. Size was stored by AllocMem
  391.     XVECT DuplicateA0       ; para: a0 =*string (0-terminated mem)
  392.                             ; return: a0=*new piece of mem with the same text
  393.                             ; (allocated with AllocMem)
  394.                             ; changed: only a0 is changed!
  395. * the next tree memory-routines are used for storing small pieces of memory
  396. * they are used for cell-texts, function-texts, cell-information,...
  397.     XVECT AllocTEXTMem      ; para: d0.l = size, return d0=a0=*mem
  398.     XVECT FreeTextMem       ; para: a0.l = allocated mem (with AllocTEXTMem!)
  399.     XVECT DuplicateTEXT     ; para: a0= *string (0-terminated)
  400.                             ; return: a0=*mem (allocated with AllocTEXTMem)
  401. *
  402.     XVECT GetTexta0         ; private
  403.     XVECT GetTexta1         ; private
  404.     XVECT GetTexta2         ; private
  405.     XVECT UpperCaseD0       ; d0.b  = UpperCase(d0.b)
  406. *
  407.     XVECT DOS_SendMessage_stack         ; private
  408.     XVECT IDCMP_SendMessage_stack       ; .
  409.     XVECT CheckA4_Sheet_getsheet        ; .  do not use these routines!!!
  410.     XVECT CheckA4_Diagram               ; .
  411.     XVECT CheckA3                       ; .
  412.     XVECT StartClip                     ; .
  413.     XVECT EndClip                       ; .
  414.     XVECT SetClip                       ; private
  415. *
  416.     XVECT Call_CDX      ; d0/d1=float1, d3/d4=float2, d7=cmd
  417.                         ; for cmd see list below!
  418. * 'get information'-routines (column/row start at 0 for first one!)
  419. * all these routines need parameter a3=*sheet!
  420.     XVECT Column_GetEntry   ; para: d0=column, return: a0=*column or 0.l
  421.     XVECT Column_GetEntry_readonly  ; dito, but no creation
  422.     XVECT Row_GetEntry      ; para: d0=row, return: a0=*row or 0.l
  423.     XVECT Row_GetEntry_readonly     ; dito, but no creation
  424.     XVECT Cell_GetEntry     ; para: d0/d1=column/row, return: a0=*cell or 0.l
  425.     XVECT Cell_GetEntry_readonly    ; dito, but no creation
  426.     XVECT Cell_GetInt       ; para: d0/d1=column/row
  427.                             ; return: d0=int, d2=TYPE_NUM(3.l) or d2=0 (error)
  428.     XVECT Cell_GetFloat     ; para: d0/d1=column/row
  429.                             ; return: d0/d1=float, d2=TYPE_FLOAT(2.l) or d2=0 (error)
  430.     XVECT Cell_GetText      ; para: d0/d1=column/row
  431.                             ; return: a0=*text (allocated with AllocMemClear)
  432.                             ; or 0.l for error!
  433.                             ; (everything will be converted to text!!!)
  434. * loading/saving-routines.
  435. *_Open-Routines change a4 as a private file-handle (containing a buffer,...)
  436. * All other routines need this handle in a4
  437. * Error handling: Except for _Open (and close, where no error can occur)
  438. * the reading/writing routines jump to the adress 'DiskErrorAdr', if
  439. * an error occurs. If you have stored the current stackpointer (a7)
  440. * when calling _Open, you can set it and close the file.
  441. * ..._Byte/Word/Long only change register d0, d1-d7/a0-a6 aren't touched!
  442.     XVECT Read_Open_noerror ; d0=0:ok, else error - a4=handle (is returned)
  443.     XVECT Read_Close    ; close file a4
  444.     XVECT Read_Byte     ; d0.b = read byte from file a4
  445.     XVECT Read_Word     ; d0.w
  446.     XVECT Read_Long     ; d0.l
  447.     XVECT Read_Size     ; read d0.l bytes to a0.l from file a4
  448.     XVECT Read_TestEOF  ; d0=0: eof, else not
  449. *
  450.     XVECT Write_Open    ; d0=0:ok, else error - a4=handle (is returned)
  451.     XVECT Write_Close   ; close file a4
  452.     XVECT Write_Byte    ; write byte d0.b to file a4
  453.     XVECT Write_Word    ; write word d0.w to file a4
  454.     XVECT Write_Long    ; write long d0.l to file a4
  455.     XVECT Write_Size    ; write d0.l bytes from a0.l to file a4
  456. * drawing routines, for all: a2=rp, a6=gfxbase (has to be set!)
  457.     XVECT XSetAPen      ; a2=rp, a6=gfxbase, d0=color
  458.     XVECT XSetAPen_color ; a2=rp, a6=gfxbase, d0=color
  459.     XVECT XSetBPen ; a2=rp, a6=gfxbase, d0=color
  460.     XVECT XSetBPen_color ; a2=rp, a6=gfxbase, d0=color
  461.     XVECT XDrawLine ; a2=rp, a6=gfxbase, d0-d3=x1/y1/x2/y2
  462.  
  463.  
  464. **** cmd-values for Call_CDX:
  465. CDX_X: equ $ffffff00    ; used for CDX_Atan+... to get moveq!
  466. CDX_Fix: equ 0
  467. CDX_Flt: equ 1
  468. CDX_Cmp: equ 2
  469. CDX_Tst: equ 3
  470. CDX_Abs: equ 4
  471. CDX_Neg: equ 5
  472. CDX_Add: equ 6
  473. CDX_Sub: equ 7
  474. CDX_Mul: equ 8
  475. CDX_Div: equ 9
  476. CDX_Floor: equ 10
  477. CDX_Ceil: equ 11
  478. *
  479. CDX_Atan: equ $80
  480. CDX_Sin: equ $81
  481. CDX_Cos: equ $82
  482. CDX_Tan: equ $83
  483. CDX_Sincos: equ $84 ; not possible!
  484. CDX_Sinh: equ $85
  485. CDX_Cosh: equ $86
  486. CDX_Tanh: equ $87
  487. CDX_Exp: equ $88
  488. CDX_Log: equ $89
  489. CDX_Pow: equ $8a
  490. CDX_Sqrt: equ $8b
  491. CDX_Tieee: equ $8c
  492. CDX_Fieee: equ $8d
  493. CDX_Asin: equ $8e
  494. CDX_Acos: equ $8f
  495. CDX_Log10: equ $90
  496.  
  497.  
  498.